#pragma once

#include <iostream>
#include <vector>
#include <functional>

using task_t = std::function<void()>;
// typedef void(*task_t)() ;

class Task
{
public:
    Task(){}
    ~Task(){}
public:
    //添加任务
    void addTask(const task_t s)
    {
        tasks.push_back(s);
    }

    //返回任务数量
    int taskCount()
    {
        return tasks.size();
    }

    task_t operator[](int taskId)
    {
        return tasks[taskId];
    }

public:
    std::vector<task_t> tasks;
};


